package com.ccrfid.rmc6.entity.device;

import com.ccrfid.rmc6.appconfig.jackson.CustomDouble2Serialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import javax.persistence.*;

@Entity
@Table(name = "v_card")
public class CardView {
    private Long id;
    private Long uid;
    private String sn;
    private Long cardNumber;
    private String hexNumber;
    private Integer cardType;
    private String cardTypeName;
    private Integer onlineStatus;
    private Integer cutoffStatus;
    private Integer lowpowerStatus;
    private Integer enabled;
    @JsonSerialize(using = CustomDouble2Serialize.class)
    private Double battery;
    private Integer heartRate;
    private Integer firmwareVersion;

    private Long personnelId;
    private String personnelName;
    private String nameAcronym;
    private String personnelSn;
    private String idNumber;
    private Integer personnelType;
    private String personnelTypeName;
    private Long orgId;
    private String orgName;
    private Integer gender;

    private Long assetId;
    private String assetName;
    private String assetSn;

    private Integer bindStatus;

    private String unifoNo;

    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uid")
    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "sn")
    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    @Basic
    @Column(name = "card_number")
    public Long getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(Long cardNumber) {
        this.cardNumber = cardNumber;
    }

    @Basic
    @Column(name = "hex_number")
    public String getHexNumber() {
        return hexNumber;
    }

    public void setHexNumber(String hexNumber) {
        this.hexNumber = hexNumber;
    }

    @Basic
    @Column(name = "card_type")
    public Integer getCardType() {
        return cardType;
    }

    public void setCardType(Integer cardType) {
        this.cardType = cardType;
    }

    @Basic
    @Column(name = "card_type_name")
    public String getCardTypeName() {
        return cardTypeName;
    }

    public void setCardTypeName(String cardTypeName) {
        this.cardTypeName = cardTypeName;
    }

    @Basic
    @Column(name = "online_status")
    public Integer getOnlineStatus() {
        return onlineStatus;
    }

    public void setOnlineStatus(Integer onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    @Basic
    @Column(name = "cutoff_status")
    public Integer getCutoffStatus() {
        return cutoffStatus;
    }

    public void setCutoffStatus(Integer cutoffStatus) {
        this.cutoffStatus = cutoffStatus;
    }

    @Basic
    @Column(name = "lowpower_status")
    public Integer getLowpowerStatus() {
        return lowpowerStatus;
    }

    public void setLowpowerStatus(Integer lowpowerStatus) {
        this.lowpowerStatus = lowpowerStatus;
    }

    @Basic
    @Column(name = "is_enabled")
    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    @Basic
    @Column(name = "battery")
    public Double getBattery() {
        return battery;
    }

    public void setBattery(Double battery) {
        this.battery = battery;
    }

    @Basic
    @Column(name = "heart_rate")
    public Integer getHeartRate() {
        return heartRate;
    }

    public void setHeartRate(Integer heartRate) {
        this.heartRate = heartRate;
    }

    @Basic
    @Column(name = "firmware_version")
    public Integer getFirmwareVersion() {
        return firmwareVersion;
    }

    public void setFirmwareVersion(Integer firmwareVersion) {
        this.firmwareVersion = firmwareVersion;
    }

    @Basic
    @Column(name = "personnel_id")
    public Long getPersonnelId() {
        return personnelId;
    }

    public void setPersonnelId(Long personnelId) {
        this.personnelId = personnelId;
    }

    @Basic
    @Column(name = "personnel_name")
    public String getPersonnelName() {
        return personnelName;
    }

    public void setPersonnelName(String personnelName) {
        this.personnelName = personnelName;
    }

    @Basic
    @Column(name = "name_acronym")
    public String getNameAcronym() {
        return nameAcronym;
    }

    public void setNameAcronym(String nameAcronym) {
        this.nameAcronym = nameAcronym;
    }

    @Basic
    @Column(name = "personnel_sn")
    public String getPersonnelSn() {
        return personnelSn;
    }

    public void setPersonnelSn(String personnelSn) {
        this.personnelSn = personnelSn;
    }

    @Basic
    @Column(name = "id_number")
    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    @Basic
    @Column(name = "personnel_type")
    public Integer getPersonnelType() {
        return personnelType;
    }

    public void setPersonnelType(Integer personnelType) {
        this.personnelType = personnelType;
    }

    @Basic
    @Column(name = "personnel_type_name")
    public String getPersonnelTypeName() {
        return personnelTypeName;
    }

    public void setPersonnelTypeName(String personnelTypeName) {
        this.personnelTypeName = personnelTypeName;
    }

    @Basic
    @Column(name = "org_id")
    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    @Basic
    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    @Basic
    @Column(name = "gender")
    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    @Basic
    @Column(name = "asset_id")
    public Long getAssetId() {
        return assetId;
    }

    public void setAssetId(Long assetId) {
        this.assetId = assetId;
    }

    @Basic
    @Column(name = "asset_name")
    public String getAssetName() {
        return assetName;
    }

    public void setAssetName(String assetName) {
        this.assetName = assetName;
    }

    @Basic
    @Column(name = "asset_sn")
    public String getAssetSn() {
        return assetSn;
    }

    public void setAssetSn(String assetSn) {
        this.assetSn = assetSn;
    }

    @Basic
    @Column(name = "bind_status")
    public Integer getBindStatus() {
        return bindStatus;
    }

    public void setBindStatus(Integer bindStatus) {
        this.bindStatus = bindStatus;
    }

    @Basic
    @Column(name = "unifo_no")
    public String getUnifoNo() {
        return unifoNo;
    }

    public void setUnifoNo(String unifoNo) {
        this.unifoNo = unifoNo;
    }
}
